package com.lmy.springboot.controller;

import com.lmy.springboot.bean.Monster;
import com.lmy.springboot.service.MonsterService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MonsterController {

    @Resource
    private MonsterService monsterService;

    @RequestMapping(value = "/getById/{id}")
    public Monster getMonsterById(@PathVariable(value = "id") Integer id) {
        return monsterService.getMonsterById(id);
    }
}
